import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { SharedModule } from '../../../shared/shared.module';
import { TctjDayComponent } from './tctj_day/tctj_day.component';
import { TctjMonthComponent } from './tctj_month/tctj_month.component';
import { PageTagComponent } from './tctj_month/page.tag';
import { TctjStatisticsComponent } from './tctj_statistics/tctj_statistics.component';
import { PrimaryComponent } from './tctj_statistics/primary.component';
import { TableComponent } from './tctj_statistics/table.component';
import { DetailModalComponent } from './tctj_statistics/detailModal.component';

@NgModule({
  imports: [
    CommonModule,
    SharedModule,
    RouterModule.forChild([
      {
        path: 'day',
        component: TctjDayComponent
      },
      {
        path: 'month',
        component: PageTagComponent
      },
      {
        path: 'statistics/:type',
        component: TctjStatisticsComponent
      },
      { path: '**', redirectTo: 'day' }
    ])
  ],
  declarations: [TctjDayComponent, TctjMonthComponent, PageTagComponent, TctjStatisticsComponent,
    PrimaryComponent, TableComponent, DetailModalComponent],
  exports: [RouterModule]
})
export class TctjModule { }
